from building import *

src   = []
cwd   = GetCurrentDir()
include_path = [cwd]
include_path += [cwd+'/lora-module/inc']

# add lora radio driver.
if GetDepend('LORA_RADIO_DRIVER_USING_LORA_MODULE_LSD4RF_2F717N30'):
    src += Split('''
    lora-module/stm32_adapter/lora-spi-board.c
    lora-module/stm32_adapter/SX1278_LSD4RF-2F717N30/sx1278-board.c
    ''')

if GetDepend('LORA_RADIO_DRIVER_USING_LORA_MODULE_LSD4RF_2R822N30'):
    src += Split('''
    lora-module/stm32_adapter/lora-spi-board.c
    lora-module/stm32_adapter/SX1262_LSD4RF-2R822N30/sx1262-board.c
    ''')

if GetDepend('LORA_RADIO_DRIVER_USING_LORA_MODULE_LSD4RF_2R717N40'):
    src += Split('''
    lora-module/stm32_adapter/lora-spi-board.c
    lora-module/stm32_adapter/SX1268_LSD4RF-2R717N40/sx1268-board.c
    ''')

if GetDepend('LORA_RADIO_DRIVER_USING_LORA_MODULE_RA_01'):
    src += Split('''
    lora-module/stm32_adapter/lora-spi-board.c
    lora-module/stm32_adapter/SX1278_Ra-01/sx1278-board.c
    ''')

if GetDepend('LORA_RADIO_DRIVER_USING_LORA_MODULE_ASR6500S'):
    src += Split('''
    lora-module/stm32_adapter/lora-spi-board.c
    lora-module/stm32_adapter/SX1262_ASR6500S/sx126x-board.c
    ''')

group = DefineGroup('lora-radio-driver/board', src, depend = ['PKG_USING_LORA_RADIO_DRIVER'], CPPPATH = include_path)

Return('group')
